<!-- application/views/script/comment/add.phtml-->
<!-- jquery validagte -->
<script src="/jquery-validate/jquery.validate.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="/jquery-validate/demo/css/screen.css" />

<script type="text/javascript">
$.validator.setDefaults({
	//submitHandler: function() { alert("submitted!"); }
});

$().ready(function() {
	
	// validate signup form on keyup and submit
	$("#commentForm").validate({
		rules: {
			comment: {
				required: true,
				rangelength: [10, 200]
			},
		}
	});

	$("#commentForm [name|='fromUrl']").val(location.href);
});

function setHiddenValue(contentType, contentId, uid){
	$("#commentForm [name|='contentType']").val(contentType);
	$("#commentForm [name|='contentId']").val(contentId);
	$("#commentForm [name|='userId']").val(uid);
}
</script>
<?php 
$commentform = new Application_Form_AddComment(array(
            'action' => '/comment/add',
            'method' => 'post'            
));

echo $commentform; 
?>

